# -*- coding:utf-8 -*-
import asyncio
from pyppeteer import launch

async def main():
    print('start launch browser')
    # browser = await launch(headless=True)
    # browser = await launch('args':['--no-sandbox'])   # 增加参数options={'args': ['--no-sandbox']}
    browser = await launch({'headless': True,'args': ['--no-sandbox']})
    # browser = await launch({'headless': True})
    print('end launch browser')
    page = await browser.newPage()
    await page.goto('http://www.baidu.com/')
    await asyncio.sleep(1)
    await browser.close()

asyncio.get_event_loop().run_until_complete(main())

